<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:f="http://java.sun.com/jsf/core"
	  xmlns:p="http://primefaces.org/ui">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Login</title>
</h:head>
<h:body>
<h2>Ingresar </h2>

<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
  
	<h:form>
		<h:panelGrid columns="2" cellpadding="10">
			
			<p:outputLabel for="nombreUsuario" value="Nombre Usuario" />
					<p:inputText id="nombreUsuario" 
						value="#{comprasMB.nombreUsuarioLogin}" 
						required="true" 
						requiredMessage="Nombre de usuario">
						<f:validateLength maximum="25" />
            		</p:inputText>			
			
			
			<p:outputLabel for="password" value="Password" />
					
					<p:password id="password" 
						value="#{comprasMB.passwordLogin}" 
						required="true" 
						requiredMessage="password requerido">
					<f:validateLength maximum="25" />	
					</p:password>
						
			
		</h:panelGrid>
		<h:panelGrid columns="2" cellpadding="10">
			<h:commandButton value="Ingresar" id="botonIngresar" action="#{comprasMB.login}"/>
			
		</h:panelGrid>
	</h:form>
</h:body>
</html>